package cn.cdeden.knowledge.service;

import cn.cdeden.common.core.utils.page.TableDataInfo;
import cn.cdeden.knowledge.domain.FilesLabelRecord;
import cn.cdeden.knowledge.domain.dto.*;
import cn.cdeden.knowledge.domain.vo.FilesLabelRecordVo;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.data.domain.Pageable;

import java.util.Collection;
import java.util.List;
import java.util.Set;

public interface FilesLabelRecordService extends IService<FilesLabelRecord>{
    /**
     * 查询数据分页
     * @param query 条件
     * @param pageable 分页参数
     * @return PageInfo<FilesLabelRecordDto>
     */
    TableDataInfo<FilesTree> queryAll(FilesLabelRecordQueryParam query, Pageable pageable);

    TableDataInfo<FilesTree> queryFileInfo(FilesLabelRecordQueryParam query, Pageable pageable);

    List<FilesTree> querySys(FilesLabelRecordQueryParam query) ;

    List<FilesLabelRecordVo> querySelect(FilesLabelRecordQueryParam query);
    TableDataInfo<FilesLabelRecordVo> querySelectPage(FilesLabelRecordQueryParam query, Pageable pageable);






    /**
     * 查询所有数据不分页
     * @param query 条件参数
     * @return List<FilesLabelRecordDto>
     */
    List<FilesLabelRecordDto> queryAll(FilesLabelRecordQueryParam query);

    FilesLabelRecord getById(Long id);
    FilesLabelRecordDto findById(Long id);

    /**
     * 插入一条新数据。
     */
    boolean insert(FilesLabelRecordList resources);
    boolean insertFileList(FilesLabelRecordFileList resources);






    boolean updateById(FilesLabelRecordDto resources);
    boolean deleteById(Long id);
    boolean deleteByIds(Set<Long> ids);


    boolean deleteByLabelIds(Set<Long> ids);
    boolean deleteByFileIds(Collection<String> ids , String type);
    boolean deleteByLabelFileIds(Collection<String> ids , String type,Long fileId);
}
